/*
 * File:   Message.cpp
 * Author: henrya
 *
 * Created on June 26, 2009, 4:15 PM
 */

#include "Message.h"

Message::Message():type(SIMPLE) ,from(-1),to(-1),sn(0),hops(1),finalDest(-1) {
}

Message::Message(MessageType type):type(type),from(-1),to(-1),sn(0),hops(1),finalDest(-1) {

}


Message::~Message() {
}

Message::MessageType Message::getType() const {
    return type;
}

void Message::setFrom(int from) {
    this->from=from;
}

void Message::setTo(int to) {
    this->to=to;
}

int Message::getFrom() {
    return from;
}

int Message::getTo() {
    return to;
}

void Message::setSN(unsigned int sn) {//for use with priorityqueue
    this->sn=sn;
}

unsigned int Message::getSN() const {
    return sn;
}
void Message::incHop() {
    hops++;
}

void Message::setFinalDest(int dest) {
    finalDest=dest;
}
int Message::getFinalDest() {
    return finalDest;
}
unsigned int Message::getCurrentHop(){
    return hops;
}
